package huawei.exam1;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @author : Rookie
 * @description :
 * @date : 2022/12/17
 */
public class HJ15 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int intNum = scanner.nextInt();
        String binaryString = Integer.toBinaryString(intNum);
        ArrayList<Character> characters = new ArrayList<>();
        for (int i = 0; i < binaryString.length(); i++) {
            if (binaryString.charAt(i) == '1') {
                characters.add(binaryString.charAt(i));
            }
        }
        System.out.println(characters.size());
    }
}
